//
//  UIView+UIVewCategory.m
//  类别
//
//  Created by 李志权 on 16/3/31.
//  Copyright © 2016年 李志权. All rights reserved.
//

#import "UIView+UIVewCategory.h"

@implementation UIView (UIVewCategory)

- (void)setWidth:(CGFloat)width
{
    CGRect frame = self.frame;
    frame.size.width = width;
    self.frame = frame;
}

- (CGFloat)width
{
    return self.frame.size.width;
}

- (void)setHighly:(CGFloat)highly
{
    CGRect frame = self.frame;
    frame.size.height = highly;
    self.frame = frame;
}
- (CGFloat)highly
{
    return self.frame.size.height;
}
- (void)setX:(CGFloat)X
{
    CGRect frame = self.frame;
    frame.origin.x = X;
    self.frame = frame;
}
- (CGFloat)X
{
    return self.frame.origin.x;
}
- (void)setY:(CGFloat)Y
{
    CGRect frame = self.frame;
    frame.origin.y = Y;
    self.frame = frame;
}
- (CGFloat)Y
{
    return self.frame.origin.y;
}
- (void)setXWidth:(CGFloat)XWidth
{
    CGRect frame = self.frame;
    self.frame = frame;
}
- (CGFloat)XWidth
{
    return self.frame.origin.x+self.frame.size.width;
}
- (void)setYHighly:(CGFloat)YHighly
{
    CGRect frame = self.frame;
    self.frame = frame;
}
- (CGFloat)YHighly
{
    return self.frame.origin.y+self.frame.size.height;
}
- (void)setchangeX:(CGFloat)X
{
    self.frame = CGRectMake(X, self.Y, self.width, self.highly);
}
- (void)setchangeY:(CGFloat)Y
{
    self.frame = CGRectMake(self.X, Y, self.width, self.highly);
}
- (void)setchangeWidth:(CGFloat)width
{
    self.frame = CGRectMake(self.X, self.Y,width, self.highly);
}
- (void)setchangeHighly:(CGFloat)highly
{
    self.frame = CGRectMake(self.X, self.Y, self.width, highly);
}
- (void)setShearRound:(CGFloat)round masksToBounds:(BOOL)masksToBounds borderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor
{
    self.layer.masksToBounds = masksToBounds;
    self.layer.borderColor = borderColor.CGColor;
    self.layer.borderWidth = borderWidth;
    self.layer.cornerRadius = round;
}
@end
